// compile: g++ -o duration duration.cc -std=c++11
// run: ./duration
#include <chrono>
#include <iostream>

using namespace std::chrono;
int main() {
  // create a duration that tracks ticks as 1/10ths of a second
  duration<int, std::ratio<1, 10>> tenths{5};

  hours h{12};   // hours is a convenience duration typedef
  auto h2 = 3h;  // 'h' is a convenience operator. h2 is a duration<int,
                 // std::ratio<3600,1>>
  return 0;
}